Skip to content

[Savestates] Fixed world being unloaded after loadstate #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2025

Conversation

ScribbleTAS
Copy link
Member

@ScribbleTAS ScribbleTAS commented May 26, 2025

This has been a thorn in my eye for a while... The chunks are rarely loaded when you load a savestate... If they are not, the motion of the client is also reset...

I've been dancing around this issue for a while and I think I got it down, finally...

The issue was that

  1. The chunks, after being loaded, where marked as "ticked = false". So when it came to sending the chunks, a check would prevent that.
  2. The chunks were not sorted(?) before sending them. Chunks are sorted every 4 ticks and savestating will also prevent that

Changes

  • Added new MixinPlayerChunkMap and PlayerChunkMapDuck to add new methods to the chunk map
  • Removed AccessorPlayerChunkmap, as it's handled via ducks
  • Removed MixinWorldServer and WorldServerDuck as it's merged with the chunkmap duck
  • Updated some documentation

@ScribbleTAS ScribbleTAS self-assigned this May 26, 2025
@ScribbleTAS ScribbleTAS added the Savestates Issue is related to savestates label May 26, 2025
@github-project-automation github-project-automation bot moved this to Todo in TASmod May 26, 2025
@ScribbleTAS ScribbleTAS force-pushed the fix/savestate-load branch from ebd023c to c8ede86 Compare May 26, 2025 21:02
@ScribbleTAS ScribbleTAS force-pushed the fix/savestate-load branch from c8ede86 to 528dc00 Compare May 26, 2025 21:04
Merged both "sendingToClient" functionality and removed a mixin and duck in the process
@ScribbleTAS ScribbleTAS force-pushed the fix/savestate-load branch from 4aed0aa to 41d0d82 Compare May 27, 2025 12:42
@ScribbleTAS ScribbleTAS moved this from Todo to In Progress in TASmod May 27, 2025
@ScribbleTAS ScribbleTAS requested a review from PancakeTAS May 27, 2025 12:50
@ScribbleTAS ScribbleTAS marked this pull request as ready for review May 27, 2025 12:50
@ScribbleTAS
Copy link
Member Author

Note that github actions are currently biting the dust, so builds may take a little longer to appear https://www.githubstatus.com/

@ScribbleTAS ScribbleTAS merged commit 50e1564 into MinecraftTAS:develop May 27, 2025
3 checks passed
@ScribbleTAS ScribbleTAS deleted the fix/savestate-load branch May 27, 2025 13:01
@github-project-automation github-project-automation bot moved this from In Progress to Done in TASmod May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Savestates Issue is related to savestates
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants